import apiRequest from '@/plugins/apiRequest.js';

// magic接口的基础路径
const magicApiContextPath = "/iszsq/app";


/**
 * app端接口
 */
export default {
	// 广告轮播、公告
	banner: {
		// 轮播广告或通知
		findList(data){
			let res = apiRequest.post(
				magicApiContextPath+'/banner/findList', 
				data,
			);
			return res;
		},
	},
	// 发型案例
	hairdoExample: {
		query(data){
			let res = apiRequest.post(
				magicApiContextPath+'/hairdoExample/query', 
				data,
			);
			return res;
		},
	},
	// 门票
	goods: {
		query(data){
			let res = apiRequest.post(
				magicApiContextPath+'/goods/query', 
				data,
			);
			return res;
		},
		get(data){
			let res = apiRequest.post(
				magicApiContextPath+'/goods/get', 
				data,
			);
			return res;
		},
	},
	// 订单
	order: {
		// 创建订单
		create(data){
			let res = apiRequest.post(
				magicApiContextPath+'/order/createOrder', 
				data,
			);
			return res;
		},
		// 当前用户的订单列表
		orderList(data){
			let res = apiRequest.post(
				magicApiContextPath+'/order/orderList', 
				data,
			);
			return res;
		},
		// 获取单个订单数据
		get(data){
			let res = apiRequest.post(
				magicApiContextPath+'/order/get', 
				data,
			);
			return res;
		},
	},
};


